package com.aabte.design.pattern.creational.prototype.mail;

import lombok.Data;

@Data
public class Mail implements Cloneable {

    private String name;
    private String emailAddress;
    private String content;

    public Mail(){
        System.out.println("Mail Class Constructor.");
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        System.out.println("clone mail object.");
        return super.clone();
    }
}
